Typically, a programmer develops and tests a software program for a computer by producing and entering source code into files through the use of an editor program. The computer then creates an executable program by translating the source code listing into machine code by running a series of programs which typically include various preprocessors, a compiler, a linker, etc. During the conversion of the source code listing to machine code, intermediate code listings may be created, e.g. a disassembly code describing subtasks within tasks defined by lines of source code; a mixed source/disassembly listing wherein both source lines and disassembly lines are sequentially listed, and other types of intermediate code structures.
Editors are programs which are used to enter or change source code and must, therefore, have the capability to display the source code for the user.
The term "line of code" will be used hereinafter and refers to (approximately) a complete instruction in the particular code language. A line of code will generally display as one line on a user display device.
A debugging system is a combination of computer hardware and debugger software which executes a user's program in a controlled manner. Debuggers aid a user in identifying and correcting mistakes in an authored program and allow the program to be executed in small segments until specified machine addresses (breakpoints) are encountered or until certain events occur (exception events). During operation of a debugger, the executing code listing is displayed, with the active line of code highlighted or otherwise indicated. The "active" line of code, in this instance, refers to a line of code which executes its defined function when the user steps to a next line of code.
Debugging software systems exist in the prior art. One such debugging system is described by Vanek et al. in "Static Analysis of Program Source Code Using EDSA", Proceedings of Conference on Software Maintenance, pages 192-199, October, 1989. Vanek et al. describe a debugging system wherein the user is enabled to view displayed code listings. All views disclosed by Vanek et al. have identical display characteristics. Each view can contain a subset of lines of the original source program and may show only declarations, only statements at or above a given level of syntactic nesting, all statements that assign a value to a given variable etc. New views may be inserted by logical operators. The EDSA system, further, is tied to the program being analyzed since it must have access to the complete details of the program which it, in turn, represents as a syntax tree and which it stores in a file.
Logitech Inc., 1235 Pear Avenue, No. 111 Mountain View, Calif. 94043 markets a window-based debugging program entitled "MultiScope" for debugging the programs written to operate in the OS/2 system program environment. The MultiScope debugging system includes both run-time and post-mortem debuggers which employ either a presentation manager or text mode interface.
MultiScope has two windows to show program codes. One window is called the Source window, and the other is called the Assembler window. The Source window shows the current code line in a high level language,and the assembler window shows it in one of several possible variants of a disassembly view. As one steps through execution, the current line shows highlighted in both views and moves with execution. The contents of the Source window can be changed to show other file/views in the appropriate higher level language. If the higher level view does not exist, an error message is placed in the Source window. The Assembler window can, as well, be reset to show a disassembly view of another source file.
Codeview, a debugger marketed by the Microsoft Corporation, Redmond, Wash., runs in a character mode within an OS/2 session window. Codeview has two windows to show program code. From either window, one may see different files in different views (source, assembler, etc.). However, only one of the windows will show the current line, i.e. the "active" window. So, if some file/view has the current line of execution, and it is showing in the active window, the appropriate line will be highlighted. But if the same view is in the other window, the current line is not highlighted. In both windows, the user may change the window contents to show different file/views.
Both MultiScope and Codeview handle the window, per se, as a separate object, independent of the code view displayed therein. Thus, if the user "closes" a window, there is no retention of the window and its contents as an object. When a user wishes to resurrect the window, both the file to be displayed and the code lines to be shown must be remembered and specified. Otherwise the window displays the initial lines of the code listing, rather than the code listing that was last shown. Furthermore, both MultiScope and Codeview are limited to two windows, and have no capability for further views.
Accordingly, it is an object of this invention to provide an improved debugging system which enables plural code listings to be simultaneously viewed, closed and recalled.
It is another object of this invention to provide an improved debugging system which enables simultaneous viewing and view management of different language manifestations of a code listing.